<?php

declare(strict_types=1);
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::any('/', function () {
    return 'hello,dear baby';
});

// 显式定义船票订单详情路由，指定id为整数类型
Route::get('index/shiporder/info/:id', 'index/shiporder/info')->pattern(['id' => '\d+']);

// 测试路由，用于验证参数传递
// 显式定义船票订单删除路由，指定id为整数类型
Route::get('index/shiporder/delete/:id', 'index/shiporder/delete')->pattern(['id' => '\d+']);

// 支付回调路由
Route::post('common/paycallback/alipay_notify', 'common/paycallback/alipay_notify');
Route::post('common/paycallback/wxpay_notify', 'common/paycallback/wxpay_notify');

// 船票订单回调
Route::post('common/paycallback/ship_order_notify', 'common/paycallback/ship_order_notify');

// 微信回调路由
Route::get('common/wechatcallback/getuserinfo/:openid', 'common/wechatcallback/getuserinfo')->pattern(['openid' => '\w+']);
Route::get('common/wechatcallback/oauth_callback', 'common/wechatcallback/oauth_callback');
Route::get('common/wechatcallback/getjssdk_sign', 'common/wechatcallback/getjssdk_sign');
Route::any('common/wechatcallback/message_notify', 'common/wechatcallback/message_notify');

Route::auto();
